<?php
$this->breadcrumbs=array(
  Yii::t('default', 'Articles') => array('index'),
  Yii::t('default', 'Article Detail')
);
?>
<h2 class="filtering">
  <span> <?php echo Yii::t('default', 'Articles')?> </span>
</h2>
<!-- **Primary Section** -->
<section id="primary" class="content-full-width"> 

  <!-- **Product** -->
  <div class="product article">
      <div class="images">
          <a class="woocommerce-main-image" title="">
            <?php
              $image = Article::model()->getArticleFile($article->id, 250, 180); 
            ?>
            <img src="<?php echo Yii::app()->baseUrl ?>/upload/article/thumbs_250x180/<?php echo $image?>" class="thumbs05" alt="" title=""> 
          </a>
        </div>
        <div class="summary">
          <h2> <?php echo $article->title?> </h2>
            <div class="description">
              <?php echo $article->detail?>
            </div>
        </div>
        
        <?php if (!empty($related_articles)) {?>
          <div class="border-title"> 
            <h2> <?php echo Yii::t('default', 'Related Products')?> </h2> 
          </div>
          
          <!-- **Product Carousel Wrapper** -->
          <div class="product-carousel-wrapper gallery">
            <ul class="product-carousel products product-list">
              <?php foreach ($related_articles as $related_article) {
                $img = Article::model()->getArticleFile($related_article['id'], 250, 180);
              ?>
                <li>
                  <div class="product-thumb article-thumb">
                    <a href="" title=""> 
                      <?php echo CHtml::image(Yii::app()->baseUrl . "/upload/article/thumbs_250x180/$img", "image", array('class'=>'thumb-related'));?> 
                    </a>
                    <div class="product-overlay">
                      <a class="link" title="<?php echo $related_article['title']?>" href="<?php echo Yii::app()->baseUrl?>/article/detail/id/<?php echo md5($related_article['id'])?>">
                        <span class="icon-external-link"> </span>
                      </a>
                    </div>
                  </div>
                  <h4><?php echo $related_article['title']?></h4>
                  <p><?php echo $related_article['description']?></p>
                </li>
              <?php }?>
            </ul>
            <div class="carousel-arrows">
              <a href="#" title="" class="product-prev-arrow"> <span
                class="icon-chevron-left"> </span> </a> <a href="#" title=""
                class="product-next-arrow"> <span class="icon-chevron-right"> </span>
              </a>
            </div>
          </div>
          <!-- **Product Carousel Wrapper - End** -->
        <?php }?>

</div>
</section><!-- **Primary Section** -->